<template>
	<view>
		<navbar title="提现" :autoBack="true"></navbar>
		<view class="con">
			<view class="con__box">
				<image src="/static/daikuan/card.png" class="con__box__card" mode=""></image>
				<view class="u-flex u-flex-y-center u-flex-between con__box__carditem">
					提现到银行卡
					<u-button v-if="!bank" @click="navto('/pages/personal/bindcard')" color="#3262FD" :customStyle='{width:"174rpx",height:"62rpx",margin:0,padding:0,borderRadius:"8rpx",fontSize:"26rpx"}'>添加银行卡</u-button>
					<view class="" v-if="bank" @click="navto('/pages/personal/bindcard')">
						{{bank.cardno}}
					</view>
				</view>
				<view class="con__box__b">
					<view class="con__box__b__t">
						提现金额
					</view>
					<view class="con__box__b__i">
						<view class="con__box__b__i__u">
							￥
						</view>
						<input type="number" class="con__box__b__i__p" />
					</view>
				</view>
				<view class="con__box__c">
					<view class="con__box__c__t">
						当前可提现金额￥10278
					</view>
					<u-button color="#3262FD" :customStyle='{width:"628rpx",height:"94rpx",margin:0,padding:0,borderRadius:"15rpx",fontSize:"32rpx"}'>提现</u-button>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import user from '@/api/_user.js'
	export default {
		data() {
			return {
				bank:null
			};
		},
		methods:{
			async getbank(){
				let res = await user.getMyBank()
				if(res.data.code==1){
					this.bank=res.data.data
				}
			}
		},
		onShow() {
			this.getbank()
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #f8f8f8;
	}

	.con {
		padding: 20rpx 30rpx;

		&__box {
			background: #FFFFFF;
			border-radius: 20rpx;
			&__card{
				width: 218rpx;
				height: 167rpx;
				margin: 94rpx 0 76rpx 235rpx;
				
			}
			&__carditem{
				padding: 0 32rpx 28rpx 37rpx;
				border-bottom: 5rpx solid #F8F8F8;
				font-family: PingFang SC;
				font-weight: bold;
				font-size: 30rpx;
				color: #1E1E1E;
				line-height: 30rpx;
			}
			&__b{
				padding: 30rpx 0 40rpx 38rpx;
				border-bottom: 5rpx solid #F8F8F8;
				&__t{
					font-family: PingFang SC;
					font-weight: bold;
					font-size: 24rpx;
					color: #1E1E1E;
					line-height: 24rpx;
					margin-bottom: 30rpx;
				}
				&__i{
					font-family: PingFang SC;
					font-weight: 800;
					color: #1E1E1E;
					line-height: 79rpx;
					display: flex;
					align-items: center;
					&__u{
						font-size: 36rpx;
						
					}
					&__p{
						font-size: 48rpx;
						line-height: 79rpx;
						height: 79rpx;
					}
				}
			}
			&__c{
				padding: 22rpx 30rpx 58rpx 30rpx;
				&__t{
					padding-left: 10rpx;
					font-family: PingFang SC;
					font-weight: bold;
					font-size: 21rpx;
					color: #8A8B94;
					line-height: 21rpx;
					margin-bottom: 60rpx;
				}
				
			}
		}
	}
</style>